Release an extra reference on GtkExpander:child
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 24 Aug 2021 00:11:15 +0000 (01:11 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 Oct 2021 21:52:04 +0000 (17:52 -0400)
commitb48e158ef8e7da35dcf646fa35f62f78683c896c
treef97973c11dd2546b13de6d032f4ed01afd4d21c0
parent4e42006d411e63fd6bf662e16ac1c8d6629e949f
Release an extra reference on GtkExpander:child

The child of a GtkExpander is owned directly by the expander whenever
the "expanded" flag is unset.

We are adding an additional reference to the child of an expander when
expander is not expanded.

Additionally, if a GtkExpander is disposed while not expanded, we need
to explicitly release the reference on the child widget that we own.

This reference leak was masked in GTK3 by GtkContainer removing each
child from the parent container by recursively calling
gtk_widget_destroy().
gtk/gtkexpander.c